const express = require('express')
const app = express()

app.use((req, res, next) => {
    console.log('req :>> ', req.hostname);
    if(req.hostname !== '127.0.0.1') {
        res.send('404')
    }
    res.send('ok')
    next()
})
app.listen(3000, () => {
    console.log('server running at http://127.0.0.1:3000')
})